package xyz.xtt.asset.api.enums;

import java.util.HashMap;
import java.util.Map;

public enum SecondEnum {
	/**
	 * default
	 */
	DEFAULT(0, "默认", "default",0),
	/**
	 * blind
	 */
	BLIND(1, "盲盒", "blind",0),
	/**
	 * rose
	 */
	ROSE(2, "玫瑰", "rose",0),
	/**
	 * mintPower
	 */
	MINT_POWER(3, "铸造权铸造", "mintPower",0),
	BOX_SECOND(4, "盲盒二级", "boxSecond",0),

	/**
	 * eastChinaRegion
	 */
	EAST_CHINA_REGION(601, "华东大区", "eastChinaRegion",60),
	/**
	 * greaterBayArea
	 */
	GREATER_BAY_AREA(602, "大湾区", "greaterBayArea",60),
	/**
	 * beijingRegion
	 */
	BEIJING_REGION(603, "北京大区", "beijingRegion",60),
	/**
	 * changshaRegion
	 */
	CHANGSHA_REGION(604, "长沙大区", "changshaRegion",60),
	;

	private int code;
	private String desc;
	private String name;
	private int FirstType;
	public int getFirstType() {
		return FirstType;
	}

	public void setFirstType(int firstType) {
		FirstType = firstType;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	SecondEnum(int code, String desc, String name, int firstType) {
		this.code = code;
		this.desc = desc;
		this.name = name;
		FirstType = firstType;
	}

	// 静态map方法
	static final Map<Integer, SecondEnum> map = new HashMap<>();
	static {
		for (SecondEnum value : SecondEnum.values()) {
			map.put(value.getCode(), value);
		}
	}

	public static SecondEnum getEnumByCode(int code) {
		return map.getOrDefault(code, null);
	}
}
